home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
graphic
/
graph322.zip
/
GRAPH.DOC
< prev
next >
Wrap
Text File
|
1990-08-04
|
26KB
|
664 lines
NAME
graph - plot a tabulated function
SYNOPSIS
graph [file file file] [options]
DESCRIPTION
Graph takes pairs of points (two numbers per line) from the given
file as x- and y- values and plots them on the screen, connected by
straight lines. A string surrounded by quotes "..." may follow a
pair of points. This string is a "point label", and will be
displayed starting at that point. The program draws axes with
convenient labels (integers times powers of 1000), plots the data,
waits for a keypress, then resets the screen parameters and clears
the screen before exiting.
If no file is specified on the command line, data is read from the
standard input, which may be redirected. If data is entered from
the keyboard, end of data is signaled by typing <cntl>Z.
In the data, blank lines and lines beginning with ';' are ignored.
More than one input file can be specified. All the data will
be read before scaling parameters are calculated. The plot
will be "broken" at the end of each file. That is, there will
be no line connecting the last point of the first file with the
first point of the second file. Similarly, if a line starts
with a null byte (that is, if a line feed is followed by a
null) the plot will be broken. Separate curves may also be
delimited with a point label on the same line as the last point
on the curve, or by a null byte immediately following the last
point (see the -b switch).
The -m switch can be used to select the line style or marker
style for each curve. If both markers and connecting lines are
wanted, list the data file twice and specify different styles.
For example,
graph gamma gamma -m 1 -30
would give red squares connected by white solid lines on an EGA.
Graph should no longer leave the display in a nonstandard mode. If it
does, please let me know. In the mean time, the display can be
restored using the DOS command MODE:
mode co80 or mode mono
as appropriate.
OPTIONS
Options can appear before, among, or after input file names
provided a file name cannot be mistaken for the parameter of an
option.
&<name> (hard copy versions only) Device driver switches are
in the configuration file <name>. See "DEVICE DRIVER
CONFIGURATION FILES" below.
@<name> or -f <name>
More parameters (filenames and/or switches) are in the script
file <name>. This can be used for lists of parameters
that are too long for a command line, or merely to save
retyping lists of parameters. The parameters in the
script file have the same format as those on the
command line, but may be separated by linefeeds as well
as spaces or tabs. More than one script file switch
may appear on the command line, and script files may
refer to other script files to any depth. All the
script files will be read. For example, if the file
"curves" contains the line
parabola elipse circle
and the file "options" contains the lines
-g -e -m 20 30 40
then the command
A>graph @curves @options
is equivalent to
A>graph parabola elipse circle -g -e -m 20 30 40
In a script file, a semicolon introduces a comment that
extends to the end of the line.
-a [<step> [<start>]]
Automatically generate abscissas. The first argument,
if present, is the step between values (default 1).
The second argument, if present, is the starting value
(default 0, or first argument from -x switch).
-b break (disconnect) the plot after each label. (See
switch -m to plot the line segments with different
linestyles. To break the plot without printing labels,
use empty labels: "".) This option is set automatically
if more than one input file or more than one linestyle
is specified.
-c <text> argument is default label for data points
-e equal vertical and horizontal scales (same number of
inches on the display per unit in problem space), so that
circles don't look like elipses
-f <name> See @<name>.
-g -g with no arguments eliminates the axes.
-g <style> <tics> <width>
First argument is grid style:
0 = no grid and no numeric labels,
1 = frame with tic marks inside (default),
-1 = frame with tic marks outside the graph area,
2 = full grid
3 = bottom and left axes only
-3 = bottom and left axes, tic marks on outside.
4 = bottom and left axes only, separated from plot
-4 = bottom and left axes, separated from plot,
tic marks on outside.
Second argument is approximate number of small
tic marks per numeric label (1 to 10, default 5). Set
<tics> to 1 to eliminate small tic marks. Third
argument is width of grid lines (default 1).
-l <text> next argument is label for graph (printed at top). If the
label starts with a double quote it may contain spaces:
-l "three cornered hat"
-m <n1> <n2> <n3>...
numeric arguments are linestyles for successive line
segments (see switch -b). Each positive argument is a
number of up to three hex digits WCS, where
W is the linewidth (0-9, with 0 giving width 1),
C is the color (0-f, with 0 being brightest), and
S is linestyle (1-5, 1 for solid, 2 for dashed,
3 for dotted, etc.)
If an argument is -1, the data points are plotted as
dots not connected by lines. In general, a negative
argument -CS generates a marker:
C is the color (0-f, with 0 being brightest), and
S is the marker style (0-9 for box, dot, plus,
asterisk, hexagon, cross, box, diamond,
triangle with point down, triangle with point
up)
The special style FF causes a curve not to be displayed
at all. An argument can also include a repeat count,
as in 3*45 or 4*-205.
The -m switch will use as many of the following
parameters as appear to be hex numbers, either negative
or positive, noteably including the switches -a through
-f. This misinterpretation may be avoided by putting
the -m switch and its arguments last in the command
line.
-n Omit numeric labels on axes. This uses more of the screen
for the graph, therefore effectively increases
resolution slightly. It may also be used when you want
to make a hard copy and label it with a typewriter. To
eliminate both grid and labels, but keep the plot
scaling the same as if labels were printed, use "-g"
alone. For plotter versions, this can be used to add
more curves to an existing graph.
-t Transpose x and y values before plotting (-x now refers to
vertical axis).
-x[l] [min [max [junk]]]
If l is present, x axis is logrithmic. First argument,
if present, is lower x limit. Second argument, if
present, is upper x limit. A third numeric argument
may be present but will be ignored. By default, these
values are determined automatically.
-y[l] [min [max [junk]]]
Similarly for y axis
-y[l]m [min [max [junk]]]
-ya[p] [min [max [junk]]]
-yp[p] [min [max [junk]]]
Any of these signal that each line of the input
contains the real and imaginary parts of a complex
number (after the abscissa, unless -a is also used).
An 'm' requests that the magnitude of the number
(square root of sum of squares of real and imaginary
parts) be plotted. 'p' or 'a' requests the phase
(atan(imaginary part/real part), also known as the
argument) be plotted. The signs of both parts are
taken into account, so the phase ranges from -pi to
+pi. If both real and imaginary parts are zero, the
phase is arbitrarily assumed to be zero. An additional
'p' requests that the phase be divided by pi before
plotting.
-h <n> argument is the fraction of the vertical space to be
used for the graph.
-u <n> argument is the fraction of the vertical space to move
up before plotting.
-w <n> argument is the fraction of the horizontal space to be
used for the graph (useful if screen dump routine
doesn't dump the entire width of the screen).
-r <n> argument is the fraction of the horiz